package rmi;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.UnknownHostException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import shared.*;


/**
 *
 * @author jfdenise
 */
public class RmiClient {

    /**
     * @param args the command line arguments
     */
    
 

    public static Monitoring getMonito(String ip) throws RemoteException, NotBoundException, UnknownHostException {
             Registry myRegistry = LocateRegistry.getRegistry(ip, 1899);
            // search for myMessage service            
            System.out.println("bound:!! "+ip);
            return (Monitoring) myRegistry.lookup(ip);
      
       
    }

   
     
  
}
